//
//  XDLMRootViewController.m
//  xindailianmeng
//
//  Created by 许佳奇 on 17/1/17.
//  Copyright © 2017年 xindailianmeng.cn. All rights reserved.
//

#import "XDLMRootViewController.h"
#import "XDLMUIFactory.h"
@interface XDLMRootViewController ()

@property (nonatomic, strong) UIBarButtonItem * leftItem;
@end

@implementation XDLMRootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.leftBarButtonItem = self.leftItem;
    
}

- (UIStatusBarStyle)preferredStatusBarStyle{
    
    return UIStatusBarStyleLightContent;
    
}
- (UIBarButtonItem *)leftItem {
    if (_leftItem == nil) {
        _leftItem = [XDLMUIFactory createBBIWithImageStr:@"back" target:self action:@selector(leftItemDidClick)];
    }
    return _leftItem;
}

- (void)leftItemDidClick {
    [self.navigationController popViewControllerAnimated:YES];
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
